<?php
class APIcom extends BaseController_Controller {
	//var $breaddata=array();
	//var $mndata=array();
	public function __construct()
	{			
			parent::__construct();					
				
			//$this->load->library('sys/sysmenu');	
			//$this->load->library('sys/sysmodule');	
			$this->load->library('cmmn/mstlookup');	
			
	}
	
	function index($sort='id')
	{	   				
		//$this->showmsg(new NotifMessage('infosdkoj','info','lklklk'));
		//$this->appendhtml('',$data,false);
	}

	 function  lookupcombo($nmspc)
	{
		if($nmspc)
		{			
			$cls=new MstLookup($nmspc);			
			$cmb=array();			
			foreach($cls->arr as $k=>$v)
			{			
				$cmb=array_merge($cmb,array(array("text"=>$v['lkpval'],"value"=>$v['lkpkey'])));
			}			
			
			echo json_encode($cmb);
		}
	}
	
} 
